//
//  WJLiveCourseCollectionFooter.m
//  CollectionViewDemo
//
//  Created by wangjie on 2018/6/7.
//  Copyright © 2018年 I just want to be a quiet and handsome man. All rights reserved.
//

#import "WJLiveCourseCollectionFooter.h"
#import <Masonry.h>

@implementation WJLiveCourseCollectionFooter

-(UILabel *)titleLabel{
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc]init];
        _titleLabel.textColor = UIColor.darkGrayColor;
        _titleLabel.text = @"(可以单独购买阶段课程，不享受全系列购买优惠)";
        _titleLabel.font = [UIFont systemFontOfSize:12];
    }
    return _titleLabel;
}


-(UILabel *)priceLabel{
    if (!_priceLabel) {
        _priceLabel = [[UILabel alloc]init];
        _priceLabel.textColor = UIColor.redColor;
        _priceLabel.text = @"price";
        _priceLabel.font = [UIFont systemFontOfSize:14];
    }
    return _priceLabel;
}


-(instancetype)initWithFrame:(CGRect)frame{
    self=[super initWithFrame:frame];
    if (self) {
        self.backgroundColor = UIColor.whiteColor;
        [self addSubview:self.titleLabel];
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(@10);
            make.top.equalTo(@10);
        }];
        
        [self addSubview:self.priceLabel];
        [self.priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(@(-10));
            make.bottom.equalTo(self.mas_bottom).offset(-10);
        }];
    }
    return self;
    
}

@end
